using AppToolKit.Model;
using AppToolKit.Model.Validation;
using System;
namespace AppToolKit.Business
{
	public abstract class EntityFactoryBase<T> : IEntityFactory<T>, IEntityFactory where T : class, IEntity
	{
		protected ValidationManager validation_;
		private IBusiness<T> business_;
		public IBusiness<T> Business
		{
			get
			{
				return this.business_;
			}
			set
			{
				this.business_ = value;
			}
		}
		protected void OnVaild()
		{
		}
		public virtual void AfterCreate(T data)
		{
		}
		public virtual ValidateResultSet Valid(object entity, ValidateBehavior bechavior)
		{
			return new ValidateResultSet();
		}
		public virtual void BeforeSave(T data)
		{
		}
		public virtual void AfterSave(T data)
		{
		}
		public virtual void BeforeUpdate(T data)
		{
		}
		public virtual void AfterUpdate(T data)
		{
		}
		public virtual void BeforeDelete(T data)
		{
		}
		public virtual void AfterDelete(T data)
		{
		}
		public virtual void BeforeDestory(T data)
		{
		}
		public virtual void AfterLoad(object t)
		{
		}
		public virtual void RegisterValidator()
		{
		}
	}
}
